/*
package com.siyougame.weixin.config;

import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps;
import me.chanjar.weixin.cp.config.impl.WxCpTpRedissonConfigImpl;
import me.chanjar.weixin.cp.tp.service.WxCpTpService;
import me.chanjar.weixin.cp.tp.service.impl.WxCpTpServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.StringRedisTemplate;

*/
/**
 * @Author: lvliangjun
 * @Date: 2024/5/23 8:55
 *//*

@Configuration
@EnableConfigurationProperties(WxCpProperties.class)
public class WxCpTpConfiguration {


    private final StringRedisTemplate stringRedisTemplate;
    private final WxCpProperties properties;

    @Autowired
    public WxCpTpConfiguration(WxCpProperties properties,StringRedisTemplate stringRedisTemplate) {
        this.properties = properties;
        this.stringRedisTemplate = stringRedisTemplate;
    }


    //模板的
//    static String token = "TPJ4Fdrpasg4R";
//    static String encodingAESKey = "msJgW0YBhnDkKQnGz8gtdSFnSarTSIxztBXWxicDPBR";
//    //模板ID：dk83899bb2c060ce44
//    //模板Secret：iK3sD1n5ovlRTDOl424mu5uGKO_VgXS5oa7V2Yf9UMA
//    static String corpid = "dk83899bb2c060ce44";
//    static String secret = "iK3sD1n5ovlRTDOl424mu5uGKO_VgXS5oa7V2Yf9UMA";

    @Bean
    public WxCpTpService wxCpTpService() {
        WxCpTpServiceImpl wxCpTpService = new WxCpTpServiceImpl();
        RedisTemplateWxRedisOps redisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);

        WxCpTpRedissonConfigImpl build = WxCpTpRedissonConfigImpl.builder()
                .corpId(properties.getSuiteId()).suiteId(properties.getSuiteId()).suiteSecret(properties.getSuiteSecret())
                .providerSecret(properties.getSuiteSecret())
                .token(properties.getToken())
                .aesKey(properties.getEncodingAesKey())
                .wxRedisOps(redisOps).build();


        wxCpTpService.setWxCpTpConfigStorage(build);

        return wxCpTpService;
    }


}
*/
